<template>
  <div class="search-bar">
    <div class="form">
      <div class="bg">
        <van-icon class="icon-search" name="search" />
        <span class="input">搜索商品名称</span>
      </div>
      <slot></slot>
    </div>
  </div>
</template>

<script>
export default {}
</script>

<style lang="scss" scoped>
.search-bar {
  height: 44px;
  padding: 7px 15px;
  background: #fff;
  box-sizing: border-box;
  .form {
    box-sizing: border-box;
    position: relative;
    display: flex;
    align-items: center;
    height: 30px;
    line-height: 30px;
    width: 100%;
    z-index: 1;
  }
  .bg {
    display: flex;
    align-items: center;
    flex: 1;
    border-radius: 3px;
    background: #f4f4f4;
  }
  .icon-search {
    margin-left: 6px;
  }
  .input {
    flex: 1;
    padding-left: 8px;
    font-size: 14px;
    color: #888b8e;
  }
}
</style>
